g08akf
g08akf
© Numerical Algorithms Group, 2002.
Purpose
G08AKF Computes the exact probabilities for the Mann-Whitney U statistic,
ties in pooled sample
Synopsis
[p,ifail] = g08akf(n1,n2,ranks,u<,tail,ifail>)
Description
G08AKF computes the exact tail probability for the Mann-Whitney U
test statistic (calculated by G08AHF and returned through the
parameter U), for the case where there are ties in the pooled
sample.
The Mann-Whitney U test investigates the difference between two
populations defined by the distribution functions F(x) and G(y)
respectively. The data consist of two independent samples of size
n and n , denoted by x ,x ,...,x and y ,y ,...,y , taken from
1 2 1 2 n 1 2 n
1 2
the two populations.
The hypothesis under test, H , often called the null hypothesis,
0
is that the two distributions are the same, that is F(x)=G(x),
and this is to be tested against an alternative hypothesis H
1
which is
H : F(x)/=G(y); or
1
H : F(x)>G(y); or
1
H : F(x)<G(y),
1
using a two-tailed, upper-tailed or lower-tailed probability
respectively. The user selects the alternative hypothesis by
choosing the appropriate tail probability to be computed.
Note that when using this test to test for differences in the
distributions one is primarily detecting differences in the
location of the two distributions. That is to say, if we reject
the null hypothesis H in favour of the alternative hypothesis H :
0 1
F(x)<G(y) we have evidence to suggest that the location, of the
distribution defined by F(x), is less than the location, of the
distribution defined by G(y).
G08AKF returns the exact tail probability, p, corresponding to U,
depending on the choice of alternative hypothesis, H .
1
The value of p can be used to perform a significance test on the
null hypothesis H against the alternative hypothesis H . Let
0 1
(alpha) be the size of the significance test (that is (alpha) is
the probability of rejecting H when H is true). If p<(alpha)
0 0
then the null hypothesis is rejected. Typically (alpha) might be
0.05 or 0.01.
Parameters
g08akf
Required Input Arguments:
n1 integer
n2 integer
ranks (n1+n2) real
u real
Optional Input Arguments: <Default>
tail (1) string 't'
ifail integer -1
Output Arguments:
p real
ifail integer